<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'userList.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<script type="text/javascript">
		function delTie(tieid){
			if(confirm("您确定删除吗？")){
				$.ajax({ 
				    type: "POST",
					url: "${ctx}/pages/tie/delete.action",
					data:{'id':tieid},
					dataType:"json",
					success: function(data){
	     		 			window.location.reload();
	     		 	}
	     		 });
			}			
		}		
	</script>
  </head>
  
  <body>
  <div id="body-wrapper">
   	<div id="main-content">
	<div class="content-box">
      <!-- Start Content Box -->
      <div class="content-box-header">
        <h3 style="cursor: s-resize;">信息列表</h3>
        <div class="clear"></div>
      </div>
      <!-- End .content-box-header -->
      <div style="display: block;" class="content-box-content">
        <div style="display: block;" id="tab1" class="tab-content default-tab">
          <table>
            <thead>
            <tr>
                <td colSpan="6">
                  <div class="clear"></div>
                </td>
              </tr>
              <tr>
                <th>ID</th>
                <th>姓名</th>
                <th>手机</th>
				<th>内容</th>
                <th>是否</th>  
                <th>时间</th>   
                <th>操作</th>
              </tr>
            </thead>
            <tfoot>
              <tr>
                <td colSpan="7">
                  <div class="pagination"> 
                  </div>
                  <div class="clear"></div>
                </td>
              </tr>
            </tfoot>
            <tbody>
              <c:forEach items="${tieList}" var="tie" varStatus="i">
              	 <tr  <c:if test="${i.count%2!=0}">class="alt-row"</c:if> >
               	<td>${tie.id}</td>
                <td>${tie.name}</td>
				<td>${tie.phone}</td>
				<td>${tie.conter}</td>
                <td><c:choose><c:when test="${tie.status=='0'}">能来</c:when><c:otherwise>不能来</c:otherwise></c:choose></td>
                <td>${tie.datetime}</td>
                <td>
                  <!-- Icons
                  <myButton:bottonTag name="修改" preUrl="/pages/tie/edit.action" href="${ctx}/pages/tie/edit.action?id=${news.id}" /> --> <myButton:bottonTag name="删除" preUrl="/pages/tie/delete.action" onclick="delTie('${tie.id}');" /></td>
              </tr>
              </c:forEach>
            </tbody>
          </table>
        </div>
      </div>
      <!-- End .content-box-content -->
    </div>
</div>
</div>
  </body>
</html>
